﻿<%
Response.Charset="utf-8"

'////////////////////////////////////////////////////////////////////
'调用类关键功能类
Dim StrClass 
Set StrClass = New ESYS_StringClass
'////////////////////////////////////////////////////////////////////
'自定义扩展函数(可按照格式自由增加)
Select Case Request("Work")
    Case "Update01" :
        Update01()
        UpdateOk()
    Case "All" :
        Update01()
        UpdateOk()
End Select
Function UpdateOk()
    Call WriteSuccessMsg("·页面更新成功！\n")
End Function
'////////////////////////////////////////////////////////////////////
'//更新链接调用
Function UpdateLink()
    Response.write "·<a href=""?Work=All"">全部更新</a>"&chr(13)
    Response.write "·<a href=""?Work=Update01"">Flash幻灯演示</a>"&chr(13)
End Function
'################################ 开始
'//说明
Function Update01()
    Dim TemplateFilePath
        TemplateFilePath=Server.MapPath("/Flash.htm")
    Dim TClass,strHtml
    Set TClass=New ESYS_TemplateClass
        strHtml=""
    Dim Rs,Sql
        Sql=" Select Top 8 * From [All_Products] Where ClassID In (7" & AllChildClass(7) & ") Order By ProductsID DESC"
    Set Rs=Conn.ExeCute(Sql)
Dim FlashImages,FlashText,FlashUrl
    While Not Rs.Eof
    '标题开始
FlashImages=FlashImages & ""& rs("Images") &"|"
FlashText=FlashText & ""& rs("Title") &"|"
FlashUrl=FlashUrl & ""&rs("PageUrl")&"?"& rs("ProductsID") &".htm|"
'标题结束
        Rs.MoveNext
    Wend
    Rs.Close
        strHtml=strHtml&"var files='"&left(FlashImages,len(FlashImages)-1)&"'"&chr(13)
        strHtml=strHtml&"var links='"&left(FlashUrl,len(FlashUrl)-1)&"'"&chr(13)
        strHtml=strHtml&"var texts='"&left(FlashText,len(FlashText)-1)&"'"
    Set Rs=Nothing
    With TClass
        .OpenTemplate(TemplateFilePath)
        .StartElement="//flash:start"
        .EndElement="//flash:end"
        .Value=strHtml
        .ReplaceTemplate()
        .Save()
    End With
    Set TClass=Nothing
End Function
'################################ 结束
%>